package com.spring.statemachine.template;

import com.spring.statemachine.template.TemplateFactory.ProcessTemplateEnum;

import java.util.Map;

/**
 * @author mayixiang
 * @date 2021-02-19 9:47
 */
public class StateMachineFactory {

    public StateMachine getT0AutoStateMachine(int productNum, int tradedate, Map<String, Object> param){
        Process processTemplate = TemplateFactory.getProcessTemplate(ProcessTemplateEnum.T0_AUTO);
        Map<String, ProcessTask> task = processTemplate.getTask();
        return new StateMachine(task, productNum, tradedate, param);
    }

    public StateMachine getT1AutoStateMachine(int productNum, int tradedate, Map<String, Object> param){
        Process processTemplate = TemplateFactory.getProcessTemplate(ProcessTemplateEnum.T1_AUTO);
        Map<String, ProcessTask> task = processTemplate.getTask();
        return new StateMachine(task, productNum, tradedate, param);
    }

    /**
     * 获取产品
     */
    public void getBsideProduct(){
        
    }

    /**
     * 获取机构参数配置
     */
    public void getGlobalparaInstitution(){

    }

}
